<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Multimedia extends CI_Controller {

	public function index() {}

	public function getVideos() {
		$this->load->model('Model_video');
		$cursor = $this->Model_video->getVideos();
		$cursor->sort(array('description' => 1));

		$arr = array();
		foreach(iterator_to_array($cursor) as $val) {
			array_push($arr, $val);
		}
		echo json_encode($arr);
	}
}

?>